#!/usr/bin/env node

const rd = require('rd');

const fs = require("fs");

// 同步列出目录下的所有文件
let files = rd.readSync('F:\\dev\\gaiay\\all');
for (let f of files) {
    let stat = fs.statSync(f);
    if (f.indexOf("resources") > 0 && stat.isFile()) {
        // console.log(f.substr(f.indexOf("resources")).split("\\") == 1)
        if (f.substr(f.indexOf("resources")).split("\\").length === 2) {
            console.log(f)
            fs.unlinkSync(f);

        }
    }
}